#include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926
#define   SQUARE(x) ((x)*(x))
//double SQUARE(double x) { return x*x;}

long long f[100]={1,1,2,3};

void w1()
{
	int a,b,n, h;
	scanf("%d", &n);
	for(;;){
		printf("%d", n);
		if(n%2)	printf("*3+1="), n = n * 3 + 1;
		else    printf("/2="),   n /= 2;
		printf("%d\n", n);
		if(1 == n) break;
	}
	printf("End");
}

int main()
{
	w1();
  return 0;
}
